﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NGUYENTHUTRANG.Test.Test_1.ex2
{
   public class StudentController : iMICControllers
    {
       public  override string PrintStudentInfo(Student obj)
       {

           string s = "My fullname is " + obj._FullName + " has rollno " + obj._RollNo + "sex is " + obj.Sex() + " Email: " + obj._Email + "Phone : " + obj._Mobiles + " Adress: " + obj._Address + " Mark: " + obj._Mark;
           return s;

       }

       public  override string CheckMarks(Student obj)
       {
           if(obj._Mark>=9)
           {
               return "Đạt loại giỏi";
           }
           else
           {
               if(obj._Mark>=7.5&&obj._Mark<9)
               {
                   return "Đạt loại khá";
               }
               else
               {
                   if (obj._Mark >= 5 && obj._Mark <= 7)
                   {
                       return "Đạt loại trung bình";
                   }
                   return "Đạt loại yếu";
               }
           }
       }

       public override bool CompareTo(Student objA, Student objB)
       {
           if(objA._Mark==objB._Mark)
           {
               return true;

           }
           return false;
       }
    }
}
